package com.zytech.zspider.task.event;

import com.zytech.zspider.core.TaskDefinition;
import com.zytech.zspider.core.TaskResult;
import com.zytech.zspider.eventbus.Event;

/**
 * @author siuming
 */
public class TaskSucceedEvent implements Event {
    private static final long serialVersionUID = 3586632113839290627L;

    private final TaskDefinition task;
    private final TaskResult taskResult;

    /**
     * @param task
     * @param taskResult
     */
    TaskSucceedEvent(TaskDefinition task, TaskResult taskResult) {
        this.task = task;
        this.taskResult = taskResult;
    }

    public TaskDefinition getTask() {
        return task;
    }

    public TaskResult getTaskResult() {
        return taskResult;
    }
}
